<!--  -->
<template>
  <div class="show">
    <el-carousel :interval="3000" type="card" height="368px">
      <el-carousel-item>
        <div @click="click1">
          <img src="~assets/img/show/15.jpg" alt="" />
          <h1>热烈庆祝中国共产党建党100周年</h1>
        </div>
      </el-carousel-item>
      <el-carousel-item>
        <div @click="click2">
          <img src="~assets/img/show/18.jpg" alt="" />
          <h1>中国共产党成立</h1>
        </div>
      </el-carousel-item>
      <el-carousel-item>
        <div @click="click3">
          <img src="~assets/img/show/17.jpg" alt="" />
          <h1>中央红军长征</h1>
        </div>
      </el-carousel-item>
      <el-carousel-item>
        <div @click="click4">
          <img src="~assets/img/show/16.jpg" alt="" />
          <h1>中国共产党史</h1>
        </div>
      </el-carousel-item>
      <el-carousel-item>
        <div @click="click5">
          <img src="~assets/img/show/19.jpg" alt="" />
          <h1>中国共产党历史上发生的重大事件</h1>
        </div>
      </el-carousel-item>
    </el-carousel>
    <div class="footer">
      <span style="font-family:arial;">Copyright &copy; 2021 dang  All Rights Reserved. </span> 
    </div>
  </div>
</template>

<script>
export default {
  name: "Show",
  data() {
    return {};
  },
  methods: {
    click1() {
      this.$router.push("/one").catch((err) => {
        err;
      });
    },
    click2() {
      this.$router.push("/two");
    },
    click3() {
      this.$router.push("/three");
    },
    click4() {
      this.$router.push("/four");
    },
    click5(){
      this.$router.push("/five");

    }
  },
};
</script>

<style scoped>
.show {
  margin-top: 120px;
  cursor: pointer;
}
.el-carousel__item img {
  width: 100%;
  height: 95%;
}
.el-carousel__item h1 {
  text-align: center;
  font-size: 20px;
  color: rgb(87, 48, 43);
  line-height: 50px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  margin-top: -8px;
}
.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.footer{
  width: 100%;
  margin: 0 auto;
  text-align: center;
  margin-top: 180px;
  color: #99a9bf;
  font-size: 13px;
}
</style>